/**
 * Copyright 2013-2015
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */	  

package com.cos.service.system.appuser.workplan;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cos.dao.DaoSupport;
import com.cos.util.PageData;

/**
 * 工作分工接口
 * <p/>
 * 
 * @author <a href="15083378620@163.com">LXJ</a>
 * @version  Date: 2016年3月25日 上午11:06:42
 * @serial 1.0
 * @since 2016年3月25日 上午11:06:42
 */
@Service("workPlanCommenService")
public class WorkPlanCommenService {
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	


	/**
	 * 获取工作分工
	 * @param pd  U_ID或者D_ID
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getWorkPlan(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("AppuserMapper.getWorkPlan", pd);
	}



	/**
	 * 获取工作分工详情
	 * @param pd  工作分工的ID
	 * @return
	 * @throws Exception 
	 */
	public PageData getWordPlanDetail(PageData pd) throws Exception {
		return (PageData)dao.findForObject("AppuserMapper.getWordPlanDetail", pd);
	}



	/**
	 * 执行组列表
	 * @param pd
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getExecute(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("AppuserMapper.getExecute", pd);	
	}



	/**
	 * 获取工作痕迹列表
	 * @param pd
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getWorkMemory(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("AppuserMapper.getWorkMemory", pd);
	}



	/**
	 * 获取工作痕迹详情
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData getWorkMemoryDetail(PageData pd) throws Exception {
		return (PageData)dao.findForObject("AppuserMapper.getWorkMemoryDetail", pd);
	}



	/**
	 * 获取主管通知列表
	 * @param pd
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getPlanComment(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("AppuserMapper.getPlanComment", pd);
	}



	/**
	 * 通过部门ID获取下面的用户
	 * @param pd
	 * @return
	 * @throws Exception 
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> getUserByDID(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("AppuserMapper.getUserByDID", pd);
	}



	/**
	 * 新增工作分工
	 * @param pd
	 * @throws Exception
	 */
	public void saveWordPlan(PageData pd) throws Exception{
		dao.save("AppuserMapper.saveWordPlan", pd);
	}



	/**
	 * 发布主管通知
	 * @param pd
	 * @throws Exception
	 */
	public void saveQaRecommend(PageData pd) throws Exception {
		dao.save("AppuserMapper.saveQaRecommend", pd);
	}



	/**
	 * 批量新增执行组 
	 * @param UID
	 * @param TID
	 * @throws Exception 
	 */
	public void saveExecuteGroup(PageData pd) throws Exception {
		dao.save("AppuserMapper.saveExecuteGroup",pd);
	}

	
	
}
